import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import { resolve } from 'path'

export default defineConfig({
  plugins: [uni()],
  resolve: {
    alias: {
      '@': resolve(process.cwd(), 'src')
    }
  },
  // uni-app 3.0 支持 src 目录结构
  // 插件会自动识别 src 目录下的文件
  build: {
    outDir: 'dist'
  },
  server: {
    port: 8080,
    open: true,
    host: '0.0.0.0'
  }
})

